//**********************************************************************************
//  PP3_4.java         Author:Tang Caiming
//
//  Reads in a floating point value, and outputs the maximum integer not greater 
//  than that value and the smallest integer that is not less than that value.
//**********************************************************************************

import java.util.Scanner;

public class PP3_4
{
   public static void main(String[] args)
   {
      Scanner scan = new Scanner(System.in);

      double num, min, max;
      
      System.out.println("Enter the num: ");
      num = scan.nextDouble();

      min = Math.floor(num);
      max = Math.ceil(num);      

      System.out.println("最小整数: " + min);
      System.out.println("最大整数: " + max);
   }
}
